package com.jycrm.webservice.sms;

import java.util.Date;

import javax.xml.rpc.ServiceException;

import org.springframework.remoting.jaxrpc.ServletEndpointSupport;

public class SmsWebServiceEndpoint extends ServletEndpointSupport implements
		ISmsWebService {

	private ISmsWebService smsWebService;

	protected void onInit() throws ServiceException {
		super.onInit();
		smsWebService = (ISmsWebService) this.getWebApplicationContext()
				.getBean("smsWebService");
	}

	public boolean sendSMSForDate(String legendId, Long userId, String passWD,
			String loginName, String mobile, String receiveType,
			Long receiverId, String content, Integer prior,
			Date completeTimeBegin, Date completeTimeEnd, Date RequestTime) {

		boolean isSuccess = smsWebService.sendSMSForDate(legendId, userId, passWD,
				loginName, mobile, receiveType, receiverId, content, prior,
				completeTimeBegin, completeTimeEnd, RequestTime);
		return isSuccess;
	}

	public boolean sendSMS(String legendId, Long userId, String passWD,
			String loginName, String mobile, String receiveType,
			Long receiverId, String content, Integer prior,
			String completeTimeBegin, String completeTimeEnd, String RequestTime) {
		boolean isSuccess = smsWebService.sendSMS(legendId, userId, passWD,
				loginName, mobile, receiveType, receiverId, content, prior,
				completeTimeBegin, completeTimeEnd, RequestTime);
		return isSuccess;
	}

	
}
